﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace T4
{
    public partial class StarForm : Form
    {
        public StarForm()
        {
            InitializeComponent();
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            //弹出定义对话框
            DialogResult result = MessageBox.Show("确定要关闭本窗体吗？？？","提示：",
                MessageBoxButtons.YesNo,MessageBoxIcon.Question);
            //判断最终点击的按钮
            if (result==DialogResult.Yes)
            {

            }
            else
            {
                e.Cancel = true;
            }
          
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void StarForm_Click(object sender, EventArgs e)
        {
            Hide();
            MainForm mainForm = new MainForm();
            mainForm.Show();
        }
    }
}
